package com.basker.pisces.domain.element.meta;

import org.springframework.util.StringUtils;

import com.basker.pisces.core.meta.annotation.DataField;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public abstract class Descriptor {

    @DataField
    private String description;

    @DataField
    private String displayName;

    @DataField
    private String name;

    @Override
    public String toString() {
        return StringUtils.isEmpty(this.displayName) ? this.name : this.displayName;
    }
}
